﻿//
// Copyright (c) 2024 BPergaofeng
//

#ifndef SRC_BPerMEETING_SRC_BPerPushMessageHandle_H_
#define SRC_BPerMEETING_SRC_BPerPushMessageHandle_H_

#include "BPerPushHandleImpl.h"

#include <bperutil/sys/BPerSysMessageHandle.h>
#include <bperutil/sys/BPerThread2.h>
#include <vector>

using namespace std;

class BPerPushMessageHandle : public BPerSysMessageHandle {
public:
    BPerPushMessageHandle(bool hasAudio, int pvideotype, BPerVideoInfo *screenvideo, BPerVideoInfo *outvideo,
                          BPerContext *pcontext, BPerSysMessageI *pmessage, BPerSysMessageHandleI *pmessageHandle);

    virtual ~BPerPushMessageHandle();

    void initAll();

    void deleteAll();

    void handleMessage(BPerSysMessage *mss);

    BPerPushHandleImpl *m_push;
private:
    int32_t pushPublish(char *user, BPerBool isWhip);

    BPerContext *m_context;
    BPerSysMessageHandleI *m_receive;

};

#endif /* SRC_BPerMEETING_SRC_BPerPushMessageHandle_H_ */
